package com.chb.utils;

import java.util.Random;

/**
 * @author: 陈海彬
 * @date: Created in 2023/10/11 15:26
 * @description: 数学工具类
 * @modified By:
 * @version: 1.0
 */
public class MathUtils {

    /**
     * @return java.lang.String
     * @create by: 陈海彬
     * @description: 生成6位数随机验证码
     * @create time: 2023/10/11 15:29
     */
    public static String randomCode() {
        StringBuffer str = new StringBuffer();
        Random random = new Random();
        for (int i = 0; i < 6; i++) {
            str.append(random.nextInt(10));
        }
        return str.toString();
    }
}